{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf390
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs24 \cf0 (\
SynthDef("JASTrigMono10dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 10;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono10statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 10;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono11dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 11;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono11statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 11;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono12dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 12;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono12statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 12;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono13dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 13;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono13statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 13;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono14dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 14;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono14statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 14;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono15dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 15;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono15statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 15;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono16dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 16;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono16statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 16;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono17dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 17;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono17statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 17;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono18dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 18;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono18statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 18;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono19dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 19;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono19statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 19;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono1dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 1;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono1statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 1;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono20dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 20;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono20statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 20;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono21dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 21;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono21statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 21;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono22dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 22;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono22statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 22;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono23dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 23;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono23statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 23;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono24dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 24;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono24statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 24;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono25dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 25;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono25statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 25;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono26dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 26;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono26statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 26;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono27dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 27;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono27statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 27;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono28dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 28;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono28statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 28;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono29dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 29;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono29statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 29;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono2dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 2;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono2statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 2;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono30dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 30;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono30statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 30;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono31dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 31;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono31statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 31;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono32dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 32;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono32statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 32;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono33dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 33;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono33statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 33;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono34dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 34;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono34statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 34;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono35dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 35;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono35statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 35;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono36dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 36;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono36statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 36;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono3dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 3;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono3statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 3;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono4dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 4;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono4statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 4;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono5dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 5;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono5statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 5;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono6dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 6;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono6statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 6;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono7dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 7;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono7statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 7;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono8dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 8;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono8statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 8;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono9dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 9;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigMono9statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200, pan = 0;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 9;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, Pan2.ar(sum(outList), pan));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter10dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 10;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter10statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 10;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter11dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 11;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter11statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 11;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter12dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 12;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter12statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 12;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter13dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 13;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter13statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 13;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter14dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 14;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter14statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 14;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter15dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 15;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter15statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 15;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter16dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 16;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter16statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 16;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter17dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 17;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter17statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 17;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter18dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 18;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter18statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 18;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter19dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 19;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter19statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 19;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter1dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 1;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter1statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 1;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter20dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 20;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter20statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 20;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter21dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 21;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter21statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 21;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter22dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 22;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter22statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 22;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter23dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 23;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter23statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 23;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter24dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 24;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter24statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 24;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter25dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 25;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter25statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 25;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter26dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 26;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter26statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 26;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter27dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 27;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter27statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 27;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter28dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 28;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter28statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 28;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter29dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 29;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter29statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 29;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter2dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 2;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter2statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 2;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter30dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 30;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter30statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 30;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter31dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 31;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter31statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 31;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter32dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 32;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter32statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 32;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter33dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 33;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter33statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 33;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter34dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 34;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter34statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 34;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter35dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 35;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter35statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 35;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter36dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 36;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter36statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 36;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter3dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 3;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter3statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 3;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter4dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 4;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter4statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 4;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter5dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 5;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter5statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 5;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter6dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 6;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter6statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 6;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter7dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 7;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter7statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 7;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter8dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 8;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter8statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 8;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter9dynaperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 9;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = PulseCount.kr(trig);\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
\
SynthDef("JASTrigSter9statperc", \
\{ arg envCurve = -7, attackDuration = 0.05, bufnum = 1, outBus = 0, triggerID = 1000, thresh = 0.004, in = 1, duration = 2, amp = 1, bufferPosition = 200;\
\
var trig, inAmp, gatedAmp, triggerBool, outamp, bufferFrames, bufRateScale;\
var bufPointer, env, envGenList, outList, trigList, maxOverlaps;\
\
maxOverlaps = 9;\
\
bufferFrames = BufFrames.kr(bufnum);\
bufRateScale = BufRateScale.kr(bufnum);\
inAmp = Amplitude.kr (AudioIn.ar(in));\
triggerBool = (AudioIn.ar(in) >= thresh);\
gatedAmp = Latch.kr(inAmp, triggerBool);\
outamp = (gatedAmp * amp);\
\
trig = Trig1.kr(triggerBool, duration / maxOverlaps);\
SendTrig.kr (trig, triggerID, outamp); //send a trigger to the client\
\
bufPointer = 1;\
//Buffer position pointer.  \
//This gets moved after each trigger in the dynamic version\
\
env = Env.perc(attackDuration,\
                    (duration - attackDuration), outamp, envCurve);\
//an envelope (Env.something)\
\
trigList = List.series(maxOverlaps);\
envGenList = List.series(maxOverlaps);\
outList = List.series(maxOverlaps);\
\
\
maxOverlaps.do(\{ arg i;\
	trigList.put(i, PulseDivider.kr(trig, maxOverlaps, i));\
	envGenList.put(i, EnvGen.kr(env, trigList.at(i)));\
	outList.put(i, PlayBuf.ar(1, bufnum, bufRateScale, trigList.at(i),\
	            (bufPointer*bufferPosition)%bufferFrames)*envGenList.at(i));\
   \});\
Out.ar(outBus, sum(outList));\
\
\}).writeDefFile;\
)}